<template>
  <el-container style="height: 100%;">
    <!-- 左侧菜单 -->
    <el-aside :style="{ width: asideWidth }">
      <CommonAside/>
      
    </el-aside>

    <!-- 右侧内容区 -->
    <el-container>
      
      <!-- 顶部 Header -->
      <el-header>
        <CommonHeader/>
        
      </el-header>
      <!-- 主要内容 -->
      <el-main>
        <router-view/>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import CommonAside from '@/mainComponents/CommonAside/CommonAside.vue';
import CommonHeader from '@/mainComponents/CommonHeader/CommonHeader.vue';
import {mapState} from "vuex";

export default {
  components: {
    CommonAside,
    CommonHeader
  },
  data () {
    return {
      asideWidth: '400px',
    };
  },
  computed: {

    // ...mapState({
    //   asideWidth: state => state.tab.asideWidth, // 绑定宽度
    // }),
  },
};
</script>
<style scoped>
  

.el-header {
  padding: 0 10px;
  background: #FFFFFF;
  box-shadow: 0 1px 4px 0 rgba(0, 21, 41, 0.12);
  text-align: center;
  line-height: 60px;
}

.el-container::v-deep.el-aside {
  background-color: #001529;
  min-height: 100vh;
  width: 8000px;
}

.el-main {
  background-color: #f5f7fa;
  overflow-y: auto;
  padding: 10px;
  flex: 1;
}
</style>
